package com.baixun.gassystem.service.impl;

import com.baixun.gasentity.vo.AbnormalPointVo;
import com.baixun.gasentity.vo.NormalPointVo;
import com.baixun.gassystem.mapper.AbnormalPointMapper;
import com.baixun.gassystem.service.AbnormalPointService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.ArrayList;
import java.util.List;

/**
 * @program: 上海燃气驾驶舱
 * @description: 异常点位实现类
 * @author: yesong
 **/
public class AbnormalPointServiceImpl extends ServiceImpl<AbnormalPointMapper, AbnormalPointVo> implements AbnormalPointService {

    @Autowired
    private AbnormalPointMapper abnormalPointMapper;

    /**
     * 查询异常点位
     * @return
     */
    @Override
    public List<AbnormalPointVo> getAllowedParameters() {
        //查询所有数据

        // 执行查询，获取符合条件的记录
        List<AbnormalPointVo> abnormalPoints = abnormalPointMapper.getAllAbnormalPoints();

        // 返回查询结果
        return abnormalPoints;
    }

    /**
     * 查询正常点位
     * @return
     */
    @Override
    public  List<NormalPointVo> getNormalParameters() {
        //查询所有数据

        // 执行查询，获取符合条件的记录
        List<NormalPointVo> abnormalPoints = abnormalPointMapper.getAllNormallPoints();

        // 返回查询结果
        return abnormalPoints;
    }



    @Override
    public List<AbnormalPointVo> getVedio() {
        return abnormalPointMapper.getAbnormalPointsByTag("视频监控");
    }

    @Override
    public List<AbnormalPointVo> getDrone() {
        return abnormalPointMapper.getAbnormalPointsByTag("无人机");
    }

    @Override
    public List<AbnormalPointVo> getFa() {
        return abnormalPointMapper.getAbnormalPointsByTag("执法仪");
    }

}
